<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
djConfig = {
    scopeMap: [
        ["dojo", "coolio"],
        ["dijit", "cooliow"],
        ["dojox", "cooliox"],
    ],
    modulePaths: {
        "coolio.actions": "../coolio/actions"
    },
    bindEncoding: "UTF-8",
    parseOnLoad : true,
    _hasResource: [],
    searchIds: []
};
</script>
<script type="text/javascript" src="<%=basePath%>javascript/dojo/dojo/dojo.js"></script>
<script type="text/javascript" src="<%=basePath%>javascript/dojo/dojox/timing/_base.js"></script>
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="../stylesheet/layout.css" />
<script type="text/javascript" src="<%=basePath%>javascript/footer_script.js"></script>
<script>
var request_count=-1;
var notification_count=-1;
var t = new cooliox.timing.Timer();
t.setInterval(3000);
t.onTick = function() {
	get_update('<%=basePath%>');
};
t.start();
get_update('<%=basePath%>');
</script>
</head>
<body>
	<jsp:include page="../common/header.jsp"></jsp:include>
	<jsp:include page="../common/navigator.jsp"></jsp:include>
	<div id="main">
	<s:property value="notice"/>
	<table>
		<tr>
			<td>requestType</td>
			<td><s:property value="request.requestType" /></td>
		</tr>
		<tr>
			<td>requesterName</td>
			<td><a href="<s:url action="get_user" namespace="/user"><s:param name="userId"><s:property value="request.requesterId"/></s:param></s:url>"><s:property value="request.requesterName" /></a></td>
		</tr>
		<tr>
			<td>responserName</td>
			<td><a href="<s:url action="get_user" namespace="/user"><s:param name="userId"><s:property value="request.responserId"/></s:param></s:url>"><s:property value="request.responserName" /></a></td>
		</tr>
		<tr>
			<td>requestTime</td>
			<td><s:property value="request.requestTime" /></td>
		</tr>
		<tr>
			<td>comment</td>
			<td><s:property value="request.comment" /></td>
		</tr>
		<tr>
			<td>solved</td>
			<td><s:property value="request.solved" /></td>
		</tr>
		<tr>
			<td>status</td>
			<td><s:property value="request.status" /></td>
		</tr>
		<s:if test="request.requestType=='ask_question'">
		<tr>
			<td>title</td>
			<td><s:property value="request.object.title" /></td>
		</tr>
		<tr>
			<td>description</td>
			<td><s:property value="request.object.description" /></td>
		</tr>
		<tr>
			<td>detail</td>
			<td><s:property value="request.object.detail" /></td>
		</tr>
		<tr>
			<td>amount</td>
			<td><s:property value="request.object.amount" /></td>
		</tr>
		<tr>
			<td>field</td>
			<td><s:iterator value="request.object.tags">
				<span id="tag<s:property value='id'/>"><s:property value="name"/></span>
				</s:iterator></td>
		</tr>
		<tr>
			<td>owner</td>
			<td><a href="<s:url action="get_user" namespace="/user"><s:param name="userId"><s:property value="request.object.ownerId" /></s:param></s:url>"><s:property value="request.object.ownerName" /></a></td>
		</tr>
		</s:if>
		<s:if test="!request.solved">
		<tr>
			<td><a href="<s:url action="accept_request"><s:param name="requestId"><s:property value="request.id" /></s:param></s:url>">accept</a></td>
			<td><a href="<s:url action="reject_request"><s:param name="requestId"><s:property value="request.id" /></s:param></s:url>">reject</a></td>
		</tr>
		</s:if>
	</table>
	</div>
	<jsp:include page="../common/footer.jsp"></jsp:include>
</body>
</html>